projects
/
project
/
bcm63xx
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dae0f5c
)
mmc/dw_mmc: Fix clock divider calculation error for bypass mode
author
Chin Liang See
<
[email protected]
>
Tue, 10 Jun 2014 06:26:52 +0000
(
01:26
-0500)
committer
Pantelis Antoniou
<
[email protected]
>
Fri, 1 Aug 2014 16:45:32 +0000
(19:45 +0300)
To fix the clock divider calculation error when the controller
clock same as the operating frequency. This is known as bypass
mode. In this mode, the divider should be 0.
Signed-off-by: Chin Liang See <
[email protected]
>
Cc: Pantelis Antoniou <
[email protected]
>
Cc: Rajeshwari Shinde <
[email protected]
>
Cc: Jaehoon Chung <
[email protected]
>
Cc: Mischa Jonker <
[email protected]
>
drivers/mmc/dw_mmc.c
patch
|
blob
|
history
diff --git
a/drivers/mmc/dw_mmc.c
b/drivers/mmc/dw_mmc.c
index 5bf36a0309d870f40be5d7d6806f0d3e0066ffb6..0df30bc04530e162603f3f7ae801518f775ae5ef 100644
(file)
--- a/
drivers/mmc/dw_mmc.c
+++ b/
drivers/mmc/dw_mmc.c
@@
-245,7
+245,10
@@
static int dwmci_setup_bus(struct dwmci_host *host, u32 freq)
return -EINVAL;
}
- div = DIV_ROUND_UP(sclk, 2 * freq);
+ if (sclk == freq)
+ div = 0; /* bypass mode */
+ else
+ div = DIV_ROUND_UP(sclk, 2 * freq);
dwmci_writel(host, DWMCI_CLKENA, 0);
dwmci_writel(host, DWMCI_CLKSRC, 0);